<template>
  <div>
    <h4>我是A组件</h4>
    <button @click="get">发送事件到eventbus中</button>
  </div>
</template>

<script>
export default {
  name: 'DemoChilda',

  data() {
    return {
      num: 1,
    }
  },

  mounted() {},

  methods: {
    //发布信息
    get() {
      console.log('aaaa')
      this.$Eventbus.$emit('eventbusname', this.num++)
      //关于.sync的用法
      this.$emit('update:show', false)
    },
  },
}
</script>

<style lang="stylus" scoped></style>